package br.com.dreamsource.mobile.worders.forms.user;

import br.com.dreamsource.mobile.worders.WOrders;
import br.com.dreamsource.mobile.components.FormWOrders;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.TextField;

/**
 *
 * @author Elizeu Nogueira da Rosa Jr.
 * @version 0.1
 * @date 20.05.2007
 *
 */

public class ChangePassword extends FormWOrders {
    
    private TextField tfActualPasswd;
    private TextField tfNewPasswd;
    private TextField tfConfirmNewPasswd;
    
    public ChangePassword(CommandListener listener, WOrders midlet) {
        super(listener, midlet, "Login");
    }
    
    private TextField getTfActualPasswd() {
        if (tfActualPasswd == null) {
            tfActualPasswd = new TextField("Senha atual", "", 120, 0x0);
        }
        return tfActualPasswd;
    }        
    
    private TextField getTfNewPasswd() {
        if (tfNewPasswd == null) {
            tfNewPasswd = new TextField("Nova senha", "", 120, 0x0);
        }
        return tfNewPasswd;
    }        
    
    private TextField getTfConfirmNewPasswd() {
        if (tfConfirmNewPasswd == null) {
            tfConfirmNewPasswd = new TextField("Confirmar Nova senha", "", 120, 0x0);
        }
        return tfConfirmNewPasswd;
    }        

    protected void createComponents() {
        this.append(this.getTfActualPasswd());
        this.append(this.getTfNewPasswd());
        this.append(this.getTfConfirmNewPasswd());
        this.addCommand(this.getOkCommand());
        this.addCommand(this.getBackCommand());
    }
    
    public void fireCommand(Command command) {
        if (command == this.okCommand) {
            
        } else
        if (command == this.backCommand) {
            
        }
    }
    
    
}
